package com.xiaoy.core.workflow.service;

import java.io.InputStream;
import java.util.List;

import org.springframework.stereotype.Service;

import com.xiaoy.core.workflow.engine.entity.ProcessDefine;

/**
 * 流程的定义
 * 	部署流程
 *  修改流程
 *   暂停
 *   启用
 *  删除流程
 * @author chentianyi
 */
@Service("processDefineService")
public class ProcessDefineService extends IProcessDefineAdapt{

	
	
	public ProcessDefine deploymentProcess (ProcessDefine info,InputStream inputStream) {
		System.out.println(info.getName());
		ProcessDefine define = workflow.DefineProcess(info.getName(),inputStream);
		
		return define;
		
	}
	
	
	@Override
	public List<ProcessDefine> deploymentProcessList() {
		
		return workflow.getAllProcessDefinitions();
	}
	

	
	
	
	
	
	
	
}
